<template>
    <div class="goodsDesc-content">
        <h1>{{this.obj.titile}}</h1>
        <hr/>
        <div class="content" v-html="this.obj.con"></div>
    </div>
</template>

<script>
    export default {
        data () {
            return {
                id: this.$route.params.id,
                obj:{}
            }
        },
        created () {
            this.acquireContent()
        },
        methods: {
            acquireContent () {
                this.$http.get('http://rap2api.taobao.org/app/mock/149003/GoodsDesc?id=' + this.id)
                    .then(result => {
                        let dic = result.body
                        if (dic.status === 200) {
                            this.obj = dic.detail;
                        }
                    })
            }
        }
    }
</script>

<style lang="scss">
    .goodsDesc-content {
        background-color: white;
        h1 {
            text-align: center;
            font-size: 16px;
            margin: 0;
            padding: 10px;
        }
        .content {
            img {
                width: 100%;
            }
        }
    }
</style>
